import Vue from 'vue'
import Router from 'vue-router'

const Index = () => import('./index/index.vue')
const IndexView = () => import('./views/index-view.vue')
const Scene = () => import('./views/scene-view.vue')
/*开发申请*/
const Application = () => import('./views/application.vue')
/*开发申请查看*/
const ApplicationInfo = () => import('./views/application-info.vue')
/*开发文档*/
const Documents = () => import('./views/documents.vue')
/*订阅*/
const Subscribe = () => import('./views/subscribe.vue')
/*推送预览*/
const Push = () => import('./views/push.vue')
/*账号设置*/
const Settings = () => import('./views/settings.vue')
/*404*/
const not404 = () => import('./views/404.vue')
/* 开发者文档 */
const us = () => import('./views/us.vue')
/* 联系我们 */
const devWiki = () => import('./views/dev-wiki.vue')

Vue.use(Router)

export default new Router({
  mode: 'history',
  base: '',
  routes: [
    {
      path: '/',
      name: '/',
      component: IndexView
    },
    {
      path: '*',
      name: 'not404',
      component: not404
    },
    {
      path: '/index',
      name: 'index',
      component: Index

    },
    {
      path: '/indexView',
      name: 'indexView',
      component: IndexView
    },
    {
      path: '/scene',
      name: 'scene',
      component: Scene

    },
    {
      path: '/application',
      name: 'application',
      component: Application,
      children: [
        {
          path: '',
          components: {
            default: devWiki
          }
        }
      ]
    },
    {
      path: '/applicationInfo',
      name: 'applicationInfo',
      component: ApplicationInfo
    },
    {
      path: '/settings',
      name: 'settings',
      component: Settings
    },
    {
      path: '/us',
      name: 'us',
      component: us
    },
    {
      path: '/devWiki',
      name: 'devWiki',
      component: devWiki
    },
    {
      path: '/push',
      name: 'push',
      component: Push
    },
    {
      path: '/subscribe',
      name: 'subscribe',
      component: Subscribe
    }
  ]
})